﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace ConcurrencyAPI.Models
{
    public class ConcurrencyContext:DbContext
    {
        public ConcurrencyContext() : base("ConcurrencyEntity") { }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Product>().Property(d => d.RowVersion).IsRowVersion();
            base.OnModelCreating(modelBuilder);
        }

        public DbSet<Product> Products { get; set; }
    }
}